package com.show.business.device.controller;
import com.show.business.common.core.controller.BaseController;
import com.show.business.common.core.domain.AjaxResult;
import com.show.business.device.bean.DeviceManage;
import com.show.business.device.bean.vo.DeviceGroupSet;
import com.show.business.device.service.IDeviceManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 首页管理 前端控制器
 * </p>
 *
 * @author dvlp
 * @since 2023-10-21
 */
@Api(value = "首页管理",description = "首页管理")
@RestController
@RequestMapping("/device/index")
public class IndexManageController extends BaseController {
    @Resource
    private IDeviceManageService deviceManageService;
    /**
     * 标签详情
     */
    @ApiOperation("详情")
    @GetMapping("/staticDeviceNum")
    public AjaxResult staticDeviceNum() {
        Map<String,Object> map=new HashMap<String,Object>();//今日新增用户
        map.put("deviceNum",deviceManageService.staticDeviceNum());//设备总数
        map.put("unusualDeviceNum",deviceManageService.staticUnusualDeviceNum());//异常数量
        map.put("lineNum",deviceManageService.staticLineNum());//正常线路数量
        map.put("unusualLineNum",deviceManageService.staticUnusualLineNum1()+deviceManageService.staticUnusualLineNum2());//正常线路数量
        return AjaxResult.success(map);
    }

}
